Binding of Isaac - Afterbirth+ Lua Reference/Guide
EntityNPC Class Reference
Inheritance diagram for EntityNPC:
Entity

Public Member Functions

 Morph (EntityType, integer Variant, integer SubType, integer ChampionColorIdx)
 
 KillUnique ()
 
boolean IsBoss ()
 
EntityGetPlayerTarget ()
 
Vector CalcTargetPosition (float DistanceLimit)
 
integer GetBossColorIdx ()
 
 ResetPathFinderTarget ()
 
boolean CanBeDamagedFromVelocity (Vector Velocity)
 
boolean CanReroll ()
 
boolean IsChampion ()
 
 MakeChampion (integer Seed)
 
 PlaySound (SoundEffect ID, float Volume, integer FrameDelay, boolean Loop, float Pitch)
 
EntityEffectMakeSplat (float Size)
 
integer GetAliveEnemyCount ()
 
 FireProjectiles (Vector Pos, Vector Velocity, ProjectilesMode Mode, ProjectilParams Params)
 
Entity_Projectile & FireBossProjectiles (integer NumProjectiles, Vector TargetPos, float TrajectoryModifier, ProjectilParams Params)
 
 AnimWalkFrame (string HorizontalAnim, string VerticalAnim, float SpeedThreshold)
 
EntityList QueryNPCsType (EntityType Type, integer Variant)
 
EntityList QueryNPCsSpawnerType (EntityType SpawnerType, EntityType Type, boolean OnlyEnemies)
 
EntityList QueryNPCsGroup (integer GroupIdx)
 
- Public Member Functions inherited from Entity
table GetData ()
 
 Update ()
 
 Render (Vector Offset)
 
boolean RenderShadowLayer (Vector Offset)
 
 PostRender ()
 
boolean TakeDamage (float Damage, integer Flags, EntityRef Source, integer DamageCountdown)
 
boolean HasMortalDamage ()
 
 Kill ()
 
 Die ()
 
 Remove ()
 
 BloodExplode ()
 
 AddVelocity (Vector Velocity)
 
 MultiplyFriction (float Value)
 
 SetColor (Color Color, integer Duration, integer Priority, boolean Fadeout, boolean Share)
 
const ColorGetColor ()
 
 SetSpriteFrame (string AnimationName, integer FrameNum)
 
 SetSpriteOverlayFrame (string AnimationName, integer FrameNum)
 
 SetSize (float Size, Vector SizeMulti, integer NumGridCollisionPoints)
 
boolean CollidesWithGrid ()
 
boolean IsEnemy ()
 
boolean IsActiveEnemy (boolean includeDead)
 
boolean IsVulnerableEnemy ()
 
boolean IsFlying ()
 
 AddEntityFlags (integer Flags)
 
 ClearEntityFlags (integer Flags)
 
integer GetEntityFlags ()
 
boolean HasEntityFlags (integer Flags)
 
boolean HasFullHealth ()
 
 AddHealth (float HitPoints)
 
 AddPoison (EntityRef Source, integer Duration, float Damage)
 
 AddFreeze (EntityRef Source, integer Duration)
 
 AddSlowing (EntityRef Source, integer Duration, float SlowValue, Color SlowColor)
 
 AddCharmed (integer Duration)
 
 AddConfusion (EntityRef Source, integer Duration, boolean IgnoreBosses)
 
 AddMidasFreeze (EntityRef Source, integer Duration)
 
 AddFear (EntityRef Source, integer Duration)
 
 AddBurn (EntityRef Source, integer Duration, float Damage)
 
 AddShrink (EntityRef Source, integer Duration)
 
 RemoveStatusEffects ()
 
boolean Exists ()
 
boolean IsDead ()
 
boolean IsVisible ()
 
boolean IsInvincible ()
 
boolean CanShutDoors ()
 
boolean IsBoss ()
 
BossId GetBossID ()
 
EntityGetLastParent ()
 
EntityGetLastChild ()
 
boolean HasCommonParentWithEntity (Entity Other)
 
boolean IsFrame (integer Frame, integer Offset)
 
RNGGetDropRNG ()
 
SpriteGetSprite ()
 
EntityPlayer ToPlayer ()
 
EntityEffect ToEffect ()
 
EntityNPC ToNPC ()
 
EntityPickup ToPickup ()
 
EntityFamiliar ToFamiliar ()
 

Static Public Member Functions

static void ThrowSpider (Vector Position, Vector TargetPos, boolean Big, float YOffset)
 

Public Attributes

boolean CanShutDoors
 
float Scale
 
const EntityNPCParentNPC
 
const EntityNPCChildNPC
 
integer StateFrame
 
PathFinder Pathfinder
 
integer State
 
integer ProjectileCooldown
 
integer ProjectileDelay
 
Vector V1
 
Vector V2
 
integer I1
 
integer I2
 
EntityEntityRef
 
integer GroupIdx
 
- Public Attributes inherited from Entity
float Friction
 
Vector Position
 
Vector Velocity
 
const EntityType Type
 
integer Variant
 
integer SubType
 
EntityType SpawnerType
 
integer SpawnerVariant
 
const ColorSplatColor
 
boolean Visible
 
const VectorPositionOffset
 
integer RenderZOffset
 
boolean FlipX
 
const VectorSpriteOffset
 
const VectorSpriteScale
 
float SpriteRotation
 
Vector SizeMulti
 
float Mass
 
float MaxHitPoints
 
float HitPoints
 
const integer Index
 
const VectorTargetPosition
 
GridCollisionClass GridCollisionClass
 
EntityCollisionClass EntityCollisionClass
 
float CollisionDamage
 
const integer SpawnGridIndex
 
EntityParent
 
EntityChild
 
EntityTarget
 
EntitySpawnerEntity
 
const integer FrameCount
 
const integer InitSeed
 
const integer DropSeed
 
float DepthOffset
 

Additional Inherited Members

- Static Public Attributes inherited from Entity
static Color Color
 
static float Size
 

Member Function Documentation

◆ AnimWalkFrame()

EntityNPC::AnimWalkFrame ( string  HorizontalAnim,
string  VerticalAnim,
float  SpeedThreshold 
)

◆ CalcTargetPosition()

Vector EntityNPC::CalcTargetPosition ( float  DistanceLimit)

◆ CanBeDamagedFromVelocity()

boolean EntityNPC::CanBeDamagedFromVelocity ( Vector  Velocity)

◆ CanReroll()

boolean EntityNPC::CanReroll ( )

◆ FireBossProjectiles()

Entity_Projectile& EntityNPC::FireBossProjectiles ( integer  NumProjectiles,
Vector  TargetPos,
float  TrajectoryModifier,
ProjectilParams  Params 
)

◆ FireProjectiles()

EntityNPC::FireProjectiles ( Vector  Pos,
Vector  Velocity,
ProjectilesMode  Mode,
ProjectilParams  Params 
)

◆ GetAliveEnemyCount()

integer EntityNPC::GetAliveEnemyCount ( )

◆ GetBossColorIdx()

integer EntityNPC::GetBossColorIdx ( )

◆ GetPlayerTarget()

Entity& EntityNPC::GetPlayerTarget ( )

◆ IsBoss()

boolean EntityNPC::IsBoss ( )

◆ IsChampion()

boolean EntityNPC::IsChampion ( )

◆ KillUnique()

EntityNPC::KillUnique ( )

◆ MakeChampion()

EntityNPC::MakeChampion ( integer  Seed)

◆ MakeSplat()

EntityEffect& EntityNPC::MakeSplat ( float  Size)

◆ Morph()

EntityNPC::Morph ( EntityType  ,
integer  Variant,
integer  SubType,
integer  ChampionColorIdx 
)

◆ PlaySound()

EntityNPC::PlaySound ( SoundEffect  ID,
float  Volume,
integer  FrameDelay,
boolean  Loop,
float  Pitch 
)

◆ QueryNPCsGroup()

EntityList EntityNPC::QueryNPCsGroup ( integer  GroupIdx)

◆ QueryNPCsSpawnerType()

EntityList EntityNPC::QueryNPCsSpawnerType ( EntityType  SpawnerType,
EntityType  Type,
boolean  OnlyEnemies 
)

◆ QueryNPCsType()

EntityList EntityNPC::QueryNPCsType ( EntityType  Type,
integer  Variant 
)

◆ ResetPathFinderTarget()

EntityNPC::ResetPathFinderTarget ( )

◆ ThrowSpider()

static void EntityNPC::ThrowSpider ( Vector  Position,
Vector  TargetPos,
boolean  Big,
float  YOffset 
)
static

Member Data Documentation

◆ CanShutDoors

boolean EntityNPC::CanShutDoors

◆ ChildNPC

const EntityNPC& EntityNPC::ChildNPC

◆ EntityRef

Entity& EntityNPC::EntityRef

◆ GroupIdx

integer EntityNPC::GroupIdx

◆ I1

integer EntityNPC::I1

◆ I2

integer EntityNPC::I2

◆ ParentNPC

const EntityNPC& EntityNPC::ParentNPC

◆ Pathfinder

PathFinder EntityNPC::Pathfinder

◆ ProjectileCooldown

integer EntityNPC::ProjectileCooldown

◆ ProjectileDelay

integer EntityNPC::ProjectileDelay

◆ Scale

float EntityNPC::Scale

◆ State

integer EntityNPC::State

◆ StateFrame

integer EntityNPC::StateFrame

◆ V1

Vector EntityNPC::V1

◆ V2

Vector EntityNPC::V2